package thread;

public class ThreadDemo1 {
    public static void main(String[] args) {
        Thread t1 = new MyThread1();
        //MyThread1 t1 = new MyThread1();//也行
        Thread t2 = new MyThread2();
        //MyThread1 t1 = new MyThread1();//也行

        t1.start();
        t2.start();
    }
}
    class MyThread1 extends Thread{
        public void run(){
            for (int i=0;i<10000;i++){
                System.out.println("干啥");
            }
        }
    }
    class MyThread2 extends Thread{
        public void run(){
            for (int i=0;i<10000;i++){
                System.out.println("我请大家");
            }
        }
    }

